<template>
    <div>
        <div>new friend {{ props.newFriendInfo }}</div>
    <button v-if=" props.newFriendInfo" @click="addNewFriend">add！</button>
    </div>

</template>
<script setup lang="ts">
import ChatUserApplicationApi from '@/api/ChatUserApplication'
const props = defineProps<{
    newFriendInfo:any
}>()
const addNewFriend = () => {
    ChatUserApplicationApi.friendApplication(props.newFriendInfo.userName).then(res => {
        if(res.data.code == '200') {
            console.log('申请已发送');
        }
    })
}
</script>
<style scoped>

</style>